jQuery(document).ready(function($){		
	//GBin1 Scroll up
	scrolltotop.controlHTML='<img src="static/images/scrolltop.png"/>';
	var mainobj=scrolltotop
	var iebrws=document.all
	mainobj.cssfixedsupport=!iebrws || iebrws && document.compatMode=="CSS1Compat" && window.XMLHttpRequest //not IE or IE7+ browsers in standards mode
	mainobj.$body=(window.opera)? (document.compatMode=="CSS1Compat"? $('html') : $('body')) : $('html,body')
	mainobj.$control=$('<div id="topcontrol">'+mainobj.controlHTML+'</div>')
		.css({position:mainobj.cssfixedsupport? 'fixed' : 'absolute', bottom:'125px', right:'0', opacity:0, cursor:'pointer'})
		.attr({title:'Scroll Back to Top'})
		.click(function(){mainobj.scrollup(); return false})
		.appendTo('body')
	if (document.all && !window.XMLHttpRequest && mainobj.$control.text()!='') //loose check for IE6 and below, plus whether control contains any text
		mainobj.$control.css({width:mainobj.$control.width()}) //IE6- seems to require an explicit width on a DIV containing text
	mainobj.togglecontrol()
	$('a[href="' + mainobj.anchorkeyword +'"]').click(function(){
		mainobj.scrollup()
		return false
	})
	$(window).bind('scroll resize', function(e){
		mainobj.togglecontrol()
	})

		
	


	});

